package com.training.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import com.training.dto.Employee;

public class HelloWorldController implements Controller {

	@Override
	public ModelAndView handleRequest(HttpServletRequest request,
			HttpServletResponse response) throws Exception {

		ModelAndView mav = new ModelAndView();
		
		Employee employee = new Employee();
		employee.setEmpId("100");
		employee.setFirstName("Gowtham");
		employee.setLastName("Alluri");
		
		mav.addObject("empl", employee);
		mav.setViewName("welcome.jsp");

		return mav;
	}

}
